#!/bin/bash
echo 'controller节点补充操作';
echo '重启httpd';
systemctl restart httpd
echo '5.同步nova-api数据库';
su -s /bin/sh -c "nova-manage api_db sync" nova
echo '6.注册cell0数据库';
su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
echo '7.创建cell1 cell';
su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
echo '8.同步nova数据库';
su -s /bin/sh -c "nova-manage db sync" nova
echo '9.验证 nova、 cell0、 cell1数据库是否注册正确';
nova-manage cell_v2 list_cells
echo '10.设置服务为开机启动';
systemctl enable openstack-nova-api.service openstack-nova-consoleauth.service openstack-nova-scheduler.service  openstack-nova-conductor.service openstack-nova-novncproxy.service
systemctl start openstack-nova-api.service  openstack-nova-consoleauth.service openstack-nova-scheduler.service  openstack-nova-conductor.service openstack-nova-novncproxy.service
echo '                      nova服务运行状态                 ';
echo '#######################################################';
systemctl status openstack-nova-api.service  openstack-nova-consoleauth.service openstack-nova-scheduler.service  openstack-nova-conductor.service openstack-nova-novncproxy.service
echo '#######################################################';
echo '-----------------------------------------------------'
echo '                  nova 2 配置完成！                  '
echo '-----------------------------------------------------'

